import React from 'react';
import { Button as AntButton } from 'antd';
import type { ButtonProps as AntButtonProps } from 'antd/es/button';

export interface ButtonProps extends AntButtonProps {
  componentId?: string;
  text?: string;
}

const Button: React.FC<ButtonProps> = ({ 
  componentId,
  text = '按钮', 
  children, 
  ...props 
}) => {
  return (
    <AntButton {...props} data-component-id={componentId}>
      {text || children}
    </AntButton>
  );
};

export default Button; 